import api from '@/api/api'
import type { IRespose } from '@/api/type'

export const getAccountList = (param: object):Promise<IRespose> => {
    return api.post('User/buynum', param);
}

export const getAccountData = (param: object):Promise<IRespose> => {
  return api.get('User/buynumEdit', {params: param})
}

export const uploadFile = (url: string, file: any):any => {
  console.log(file.get("level_image"), 'file')
  file.append('m', '2020jksy')
    const config = {
      headers: { "Content-Type": "multipart/form-data" }
    };

    return api.post(url, file, config);
  };

  

export const delAccount = (param: object):Promise<IRespose> => {
    return api.post('User/buynumDel', param);
}

